package com.bingo.rbac.dto;

import com.bingo.rbac.pojo.SysDept;
import com.google.common.collect.Lists;
import org.springframework.beans.BeanUtils;

import java.util.List;

/**
 * dto
 *
 * @author bingo
 * @create 2017-12-04 11:30
 **/

public class SysDeptDto extends SysDept {

    private List<SysDeptDto> list = Lists.newArrayList();

    public List<SysDeptDto> getList() {
        return list;
    }

    public void setList(List<SysDeptDto> list) {
        this.list = list;
    }

    public static SysDeptDto adapt(SysDept sysDept){
        SysDeptDto dto = new SysDeptDto();
        BeanUtils.copyProperties(sysDept, dto);
        return dto;
    }

    @Override
    public String toString() {
        return "SysDeptDto{" +
                "list=" + list +
                '}';
    }
}
